'''
    download the pre-trained model
'''
import torch.hub
import torchvision.models as models

pthfile = 'https://download.pytorch.org/models/vgg16-397923af.pth'  # Add file before the downloaded pth file path: get the url
pthsavefile = './state'  # this is the path where the model is saved

VGG16_pre = models.vgg16(pretrained=False) # If pretrained=True, it will be downloaded automatically
state_dict = torch.utils.model_zoo.load_url(pthfile,
											model_dir=pthsavefile,
											map_location=None,
											progress=True,
											check_hash=False)
print('------------------------------------------\n'
      '         download successfully            \n'
      '------------------------------------------')

print(VGG16_pre)